package com.chemical.search.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *@className:BaseAttribute.java
 *@classDescription:
 *@author:MChen
 *@createTime:2012-4-19
 */
@Entity
@Table(name = "baseattribute")
public class BaseAttribute {
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer scr;	//化学结构比较和登录确认的化合物唯一编号
	@Column(name = "name_en", nullable = false)
	private String name_en;	//英文名称
	@Column(name = "name_cn")
	private String name_cn;	//中文名称
	@Column(name = "molecular_formula")
	private String molecular_formula;	//分子式
	@Column(name = "structural_formula")
	private String structural_formula;	//结构式
	@Column(name = "cas_rn")
	private String cas_rn;		//CAS编号
	@Column(name = "picture_Name")
	private String picture_Name;	//图片
	@Column(name = "scr_usage")
	private String scr_usage;	// 化合物用途
	@Column(name = "scr_type")
	private String scr_type;	// 化合物类别
	@Column(name = "inputTime", nullable = false)
	private Date inputTime;		//录入时间
	@OneToOne(mappedBy="baseattribute")
	private AdditionalAttribute addattribute;
	
	public Integer getScr() {
		return scr;
	}
	public void setScr(Integer scr) {
		this.scr = scr;
	}
	public String getName_en() {
		return name_en;
	}
	public void setName_en(String nameEn) {
		name_en = nameEn;
	}
	public String getName_cn() {
		return name_cn;
	}
	public void setName_cn(String nameCn) {
		name_cn = nameCn;
	}
	public String getMolecular_formula() {
		return molecular_formula;
	}
	public void setMolecular_formula(String molecularFormula) {
		molecular_formula = molecularFormula;
	}
	public String getStructural_formula() {
		return structural_formula;
	}
	public void setStructural_formula(String structuralFormula) {
		structural_formula = structuralFormula;
	}
	public String getCas_rn() {
		return cas_rn;
	}
	public void setCas_rn(String casRn) {
		cas_rn = casRn;
	}
	public String getPicture_Name() {
		return picture_Name;
	}
	public void setPicture_Name(String pictureName) {
		picture_Name = pictureName;
	}
	public String getScr_usage() {
		return scr_usage;
	}
	public void setScr_usage(String scrUsage) {
		scr_usage = scrUsage;
	}
	public String getScr_type() {
		return scr_type;
	}
	public void setScr_type(String scrType) {
		scr_type = scrType;
	}
	public Date getInputTime() {
		return inputTime;
	}
	public void setInputTime(Date inputTime) {
		this.inputTime = inputTime;
	}
	public AdditionalAttribute getAddattribute() {
		return addattribute;
	}
	public void setAddattribute(AdditionalAttribute addattribute) {
		this.addattribute = addattribute;
	}
	@Override
	public String toString() {
		return "BaseAttribute [addattribute=" + addattribute + ", cas_rn="
				+ cas_rn + ", inputTime=" + inputTime + ", molecular_formula="
				+ molecular_formula + ", name_cn=" + name_cn + ", name_en="
				+ name_en + ", picture_Name=" + picture_Name + ", scr=" + scr
				+ ", scr_type=" + scr_type + ", scr_usage=" + scr_usage
				+ ", structural_formula=" + structural_formula + "]";
	}
}
